package interf1;

public class MainClass {
	public static void main(String[] args) {
		X[] objs = new X[3];

		objs[0] = new ExB();
		objs[1] = new ExA();
		objs[2] = new ExB();

		for (X x : objs)
			System.out.println(" Objs:  " + x.gety());
		
		((ExB) objs[2]).y = 200;
		System.out.println();

		for (X x : objs)
			System.out.println(" Objs: " + x.gety());
	}
}
